for i in range(1,10):
    for n in range(1,i+1):
        res = i*n
        print(f'{i}*{n}={res}',end='\t')
    print(end='\n')


for i in range(9,0,-1):
    for n in range(i,0,-1):
        res = i*n
        print(f'{i}*{n}={res}',end='\t')
    print(end='\n')

